<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<style type="text/css">
		iframe{
			width:300px;
			height:300px;
			border:1px solid red; 
		}
	</style> 
	<script type="text/javascript"> 
	 	window.addEventListener("message",function(e){
	 		alert(e.data);
	 	})
		function sendMessage(){ 
			var contentwindow=document.getElementById("ifm").contentWindow;
		contentwindow.postMessage("json","http://127.0.0.1:8020/Event_example/postMessage.html")
		} 
	    </script>
	<body> 
		<iframe src="http://127.0.0.1:8020/Event_example/postMessage.html" id="ifm"></iframe> 
		
	    <button onclick="sendMessage()">发送消息</button>
	</body>
	
</html>
